Use barometer data for altitude hold#97
Draft
vishwamartur wants to merge 1 commit into
Draft
Conversation
Related to espressif#89 Implement the use of barometer data for altitude/height hold. * **Process Barometer Measurements** - Implement the `processBarometerMeasurements` function in `sensors_mpu6050_hm5883L_ms5611.c` to process barometer data from the MS5611 sensor. - Update the `sensorsSetupSlaveRead` function to configure the MS5611 sensor for reading pressure and temperature data. - Update the `sensorsTask` function to call `processBarometerMeasurements` when barometer data is available. * **Altitude Estimation** - Update the `positionEstimateInternal` function in `position_estimator_altitude.c` to incorporate barometer data for altitude estimation. - Add a blending factor `baroAlpha` for barometer data in the `selfState_s` structure. * **Vertical Velocity Update** - Update the `positionUpdateVelocityInternal` function in `position_estimator_altitude.c` to update the vertical velocity using barometer data. - Add a blending factor `baroAlpha` for barometer data in the `selfState_s` structure. * **Parameter Addition** - Add a new parameter `baroAlpha` to the `posEstAlt` parameter group in `position_estimator_altitude.c`.
Collaborator
|
Hi @vishwamartur , thanks for your contribution. This changes LGTM! Have you enabled the MS5611 and tested on the real hardware ? |
Author
|
Thank you! The code has not been tested on real hardware yet. I will validate the code again and provide an update. We can sync up and conduct testing afterward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #89
Implement the use of barometer data for altitude/height hold.
Process Barometer Measurements
processBarometerMeasurementsfunction insensors_mpu6050_hm5883L_ms5611.cto process barometer data from the MS5611 sensor.sensorsSetupSlaveReadfunction to configure the MS5611 sensor for reading pressure and temperature data.sensorsTaskfunction to callprocessBarometerMeasurementswhen barometer data is available.Altitude Estimation
positionEstimateInternalfunction inposition_estimator_altitude.cto incorporate barometer data for altitude estimation.baroAlphafor barometer data in theselfState_sstructure.Vertical Velocity Update
positionUpdateVelocityInternalfunction inposition_estimator_altitude.cto update the vertical velocity using barometer data.baroAlphafor barometer data in theselfState_sstructure.Parameter Addition
baroAlphato theposEstAltparameter group inposition_estimator_altitude.c.